<div class="rightcontent rc-bg-grey">
    <div class="rc-pagepadding">

        <div class="rc-pannel rc-searchbox">
            <form class="layui-form " method="get">
                <div class="rc-flex-vertical-center rc-searchbox">
                    <div class="layui-inline ">
                        <label class="layui-form-label">钩子名称</label>
                        <div class="layui-input-inline ">
                            <input type="text" name="title" placeholder="" value="<?php echo request()->get('title', ''); ?>" autocomplete="off" class="layui-input">
                        </div>
                    </div>



                    <div class="layui-inline">
                        <div class="layui-form-label">
                            <button type="submit" class="layui-btn layui-btn-sm layui-btn-primary"><i class="iconfont">&#xeafe;</i> 搜索</button>
                        </div>
                    </div>
                </div>
            </form>
        </div>


        <div class=" rc-pannel rc-margin-top-default">



            <div class="rc-pannel-body layui-form rc-pagepadding">

                <table class="layui-table">
                    <colgroup>
                        <col>
                        <col>
                        <col>
                        <col>
                        <col>
                        <col style="width: 140px;">

                    </colgroup>
                    <thead>
                        <tr>
                            <th>ident</th>
                            <th>钩子名称</th>
                            <th>钩子附带部分参数</th>
                            <th>描述</th>
                            <th>所属应用</th>
                            <th></th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php
                        foreach ($hooks as $key => $hook) {
                        ?>
                            <tr>
                                <td><?php echo $hook->ident; ?></td>
                                <td><?php echo $hook->title; ?></td>
                                <td><?php echo $hook->param; ?></td>
                                <td><?php echo $hook->remark; ?></td>
                                <td><?php echo isset($plugins[$hook->plugin]) ? $plugins[$hook->plugin]['title'] : '框架'; ?></td>
                                <td>
                                    <div class="rc-opbar" style="width: 150px;margin-left:15px">
                                        <a class="info mount" href="javascript:;" hookid="<?php echo $hook->id ?>"> <i class="iconfont">&#xe643;</i> 触发事件</a>

                                    </div>
                                </td>
                            <?php
                        }
                            ?>

                    </tbody>
                </table>
            </div>

            <div class="rc-pannel-footer">
                <div class="pagebar" id="pagebar" style="text-align: right;">
                    <?php echo paginator($hooks->total(), 20)
                    ?>
                </div>

            </div>
        </div>
    </div>
</div>
<script>
    layui.use(function() {

        var layer = layui.layer;


        $('.mount').click(function() {
            var hookid = $(this).attr('hookid');
            layer.open({
                type: 2,
                offset: 'r',
                move: false,
                anim: 'slideLeft', // 从右往左
                area: ['800px', '100%'],
                shade: 0.1,
                title: '触发事件',
                id: 'ID-demo-layer-direction-r',
                content: '/admin/cnf/Hook/triggerEvent?hookid=' + hookid
            });
        });




    });
</script>